package aufgabe2;

import de.tu.tree.BinNode;


public class BinTreeNode implements BinNode<Integer> {
	
	
	Integer data;
	BinTreeNode left;
	BinTreeNode right;
	
	public BinTreeNode(Integer data) {
		this.data = data;
	}

	public Integer getData() {
		return data;
	}

	public void setData(Integer data) {
		this.data = data;
	}

	public BinTreeNode getLeft() {
		return left;
	}

	public void setLeft(BinTreeNode left) {
		this.left = left;
	}

	public BinTreeNode getRight() {
		return right;
	}

	public void setRight(BinTreeNode right) {
		this.right = right;
	}

	public boolean isLeaf() {
		return right == null && left == null;
	}
	
	public String toString(){
		return data.toString();
	}
	
	
}
